package com.kitty.game.team.model;

import com.kitty.game.role.model.Role;
import lombok.Getter;
import lombok.Setter;

/**队伍成员*/
@Getter
@Setter
public class Member {
    private int roleId;
    private String name;
    private String party;
    private short level;
    private short icon;
    private String gid;
    private byte sex;
    private short menpai;
    private int zhanji;
    private boolean inTeam = true;//false暂离,true入队
    private boolean isGuard;//是不是守护
    private short weaponIcon;//武器Icon
    private int suitIcon;//套装Icon
    private byte flyStatus;//飞升状态
    private String cardName;//变身卡名字 TODO 阵法需要


    public static Member valueOf(Role role) {
        Member member = new Member();
        member.setRoleId(role.getRoleId());
        member.setIcon(role.getRoleIcon());
        member.setLevel(role.getLevel());
        member.setName(role.getName());
        member.setParty(role.getPartyName());
        member.setZhanji(role.getTotalScore());
        member.setMenpai(role.getPolar());
        member.setSex(role.getGender());
        member.setSuitIcon(role.getSuitId());
        member.setWeaponIcon((short) role.getWeaponIcon());
        member.setGid(role.getGid());

        return member;
    }

    public long getUid() {
        return Long.parseLong(gid);
    }
}
